package hello;

/**
 * Created with IntelliJIDEA.
 * Description:
 * User: ASUS
 * Date: 2025/8/31
 * Time: 10:22
 */
// 因为类是 public class Student，文件名必须是 Student.java
public class Student1 {
    // 属性
    public String name;
    public String gender;
    public short age;
    public double score;

    // 方法
    public void DoClass() {
        System.out.println(name + " 正在上课...");
    }

    public void DoHomework() {
        System.out.println(name + " 正在做作业...");
    }

    public void Exam() {
        System.out.println(name + " 正在考试...");
    }

    // 增加一个方法来显示学生信息
    public void displayInfo() {
        System.out.println("姓名: " + name + ", 性别: " + gender + ", 年龄: " + age + ", 分数: " + score);
    }
}